package com.hs.jhzd.repository;

import com.hs.jhzd.entity.JqYxjqxxbEntity;
import com.hs.jhzd.entity.YlFyjhxxbEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.Date;
import java.util.List;

public interface JqYxJqxxbRepository extends JpaRepository<JqYxjqxxbEntity, String> {
    @Query("SELECT u FROM JqYxjqxxbEntity u WHERE u.rybh LIKE CONCAT('%',:rybh,'%')")
    List<JqYxjqxxbEntity> findByRybh(@Param("rybh") String rybh);


    @Query("select y from JqYxjqxxbEntity y where y.rybh LIKE CONCAT('%',?1,'%')  and y.cjsj BETWEEN ?2 and ?3")
    public List<JqYxjqxxbEntity> findByRybhcAndCjsj(String rybh, Date startTime, Date endTime);
}
